package org.apache.mina.example.lily;

import java.net.InetSocketAddress;

import org.apache.mina.core.future.ConnectFuture;
import org.apache.mina.http.HttpClientCodec;
import org.apache.mina.transport.socket.nio.NioSocketConnector;

public class PressTest {

	
	public static void main(String[] args) {
		NioSocketConnector connector = new NioSocketConnector();
		connector.getFilterChain().addLast("codec", new HttpClientCodec());
//		connector.getSessionConfig().setKeepAlive(true);
		connector.setHandler(new HttpRequestHandler());
		ConnectFuture connect =connector.connect(new InetSocketAddress("119.97.231.228", 2007));
//		for(int i=1;i<=100;i++){
//			connector.connect(new InetSocketAddress("10.161.144.28", 8080));
//			if(i%100==0)
//			System.out.println(i+" connection create");
//		}
		
		connect.awaitUninterruptibly();
	}
}
